package com.atguigu.gulimall.auth.config;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author weichen
 * @email 519543138@qq.com
 * @date 2022-10-30 下午3:44
 */
@Component
public class GulimallWebConfig implements WebMvcConfigurer {
    /**
     * @GetMapping("/login.html")
     *     public String LoginPage(){
     *         return "login";
     *     }
     *
     * 视图映射
     * @param registry
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
//        registry.addViewController("/login.html").setViewName("login");
        registry.addViewController("/reg.html").setViewName("reg");
    }

}
